Fix Aspire AppHost not building email templates before APIs become ready#886
Merged
tjementum merged 2 commits intoMay 4, 2026
Merged
Conversation
…mails on first request
…ck-style copy rewrite
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary & Motivation
After the localized-emails feature merged to main, starting Aspire on a fresh clone (or any environment without a populated
application/account/WebApp/emails/dist/folder) returned HTTP 500 from every email-sending endpoint withSystem.IO.FileNotFoundException: Email template 'StartSignup.en-US.html' not found. The crash cascaded through 11 of 14 e2e smoke tests. The dist folder is a gitignored build artifact only populated by the@repo/emails#buildturbo task; nothing in the dev pipeline triggered that task before the AppGateway accepted requests.@repo/emails#buildtodev:setup'sdependsOninapplication/turbo.json. The Aspire AppHost'sfrontendBuildresource runsnpm start→turbo dev, anddevdepends ondev:setup. Hooking@repo/emails#buildintodev:setupmakes turbo block every package's dev server until the email dist exists. The same flow protects every entry point that funnels throughturbo dev—pp restart,pp run,pp e2e,dotnet run --project AppHost, and any IDE-launched AppHost.application/account/WebApp/tests/e2e/localized-email-flows.spec.tsto match the Slack-style copy the email template was rewritten to use ("No account found" / "Is this the right email address?" in English, "Ingen konto fundet" / "Er det den rigtige e-mailadresse?" in Danish). The previous strings ("Unknown user tried to login to PlatformPlatform" / "You or someone else tried to login to PlatformPlatform") no longer exist in the rendered emails.Checklist